package 测试;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class 奖学金 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int n = Integer.parseInt(sc.next());
			int r = Integer.parseInt(sc.next());
			int avg = Integer.parseInt(sc.next());
			int[] a = new int[n];
			int[] b = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = Integer.parseInt(sc.next());
				b[i] = Integer.parseInt(sc.next());
			}
			System.out.println(func(n, r, avg, a, b));
		}
		sc.close();
	}

	private static long func(long n, long r, long avg, int[] a, int[] b) {
		long time = 0;
		sort(a, b);
		for (int i = 0; i < n; i++) {
			if (sum(a) >= n * avg) {
				break;
			}
			while (a[i] < r) {
				a[i]++;
				time += b[i];
				if (sum(a) >= n * avg) {
					break;
				}
			}
		}
		return time;
	}

	private static long sum(int[] a) {
		long sum = 0;
		for (int i = 0; i < a.length; i++) {
			sum += a[i];
		}
		return sum;
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static void sort(int[] a, int[] b) {
		TreeMap<Integer, ArrayList<Integer>> hm = new TreeMap<Integer, ArrayList<Integer>>();
		for (int i = 0; i < b.length; i++) {
			if (hm.containsKey(b[i])) {
				hm.get(b[i]).add(a[i]);
			} else {
				hm.put(b[i], new ArrayList<Integer>());
				hm.get(b[i]).add(a[i]);
			}
		}
		for (Map.Entry x : hm.entrySet()) {
			Integer key = (Integer) x.getKey();
			ArrayList<Integer> value = (ArrayList<Integer>) x.getValue();
			Collections.sort(value, new Comparator<Integer>() {
				@Override
				public int compare(Integer o1, Integer o2) {
					return o1 < o2 ? 1 : -1;
				}
			});
			hm.put(key, value);
		}

		int idx = 0;
		for (Map.Entry x : hm.entrySet()) {
			Integer key = (Integer) x.getKey();
			ArrayList<Integer> value = (ArrayList<Integer>) x.getValue();
			for (int i = 0; i < value.size(); i++) {
				a[idx] = value.get(i);
				b[idx++] = key;
			}
		}
	}
}
